package com.kaikeba.bean;

import java.sql.Timestamp;
import java.util.Objects;

/**
 * @ClassName Courier
 * @Description TODO
 * @Author Wuky
 * @Time 2022/1/13 16:18
 * @Version 1.0
 **/
public class Courier extends WxUser{
    private int id;
    private String username;
//    private String userPhone;
    private String sfz;
    private String password;
    private int pieces;
    private Timestamp registerTime;
    private Timestamp loginTime;

    public Courier() {
    }

    public Courier(int id, String username, String userPhone, String sfz, String password, int pieces, Timestamp registerTime, Timestamp loginTime) {
        this.id = id;
        this.username = username;
        this.userPhone = userPhone;
        this.sfz = sfz;
        this.password = password;
        this.pieces = pieces;
        this.registerTime = registerTime;
        this.loginTime = loginTime;
    }

    public Courier(String username, String userPhone, String sfz, String password) {
        this.username = username;
        this.userPhone = userPhone;
        this.sfz = sfz;
        this.password = password;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Courier courier = (Courier) o;
        return id == courier.id &&
                Objects.equals(username, courier.username) &&
                Objects.equals(userPhone, courier.userPhone) &&
                Objects.equals(sfz, courier.sfz) &&
                Objects.equals(password, courier.password);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, username, userPhone, sfz, password);
    }

    @Override
    public String toString() {
        return "Courier{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", userPhone='" + userPhone + '\'' +
                ", sfz='" + sfz + '\'' +
                ", password='" + password + '\'' +
                ", pieces=" + pieces +
                ", registerTime=" + registerTime +
                ", loginTime=" + loginTime +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getSfz() {
        return sfz;
    }

    public void setSfz(String sfz) {
        this.sfz = sfz;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getPieces() {
        return pieces;
    }

    public void setPieces(int pieces) {
        this.pieces = pieces;
    }

    public Timestamp getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(Timestamp registerTime) {
        this.registerTime = registerTime;
    }

    public Timestamp getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Timestamp loginTime) {
        this.loginTime = loginTime;
    }
}
